<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <ul>
      <li v-for="item in news">{{item.id}}-{{item.article}}</li>
    </ul>
    <ul>
      <li v-for="item in users">{{item.id}}-{{item.name}}</li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'maoxiu',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App'
    }
  },
  computed:{
    news(){
      return this.$store.getters.getAllNews
    },
    users(){
      return this.$store.getters.getUsers
    }
  }
}
</script>

